package cn.yuanqiao.archive.liyong.service;

import cn.yuanqiao.archive.liyong.domain.ListQuery;
import cn.yuanqiao.common.core.domain.entity.SysUser;

import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;

/**
 * 目录检索分页  异步
 *
 * @ProjectName: JZSDAS
 * @Package: cn.yuanqiao.archive.liyong.service
 * @ClassName: ListQueryPageService
 * @Author: lenovo
 * @Description: hbWang
 * @Date: 2023/11/29 15:39
 * @Version: 1.0
 */
public interface ListQueryPageService {
    /**
     * 查询数据
     *
     * @param field
     * @param sql
     * @param query
     * @param listQuery
     * @return
     */
    CompletableFuture<List<Map<String, Object>>> queryList(String field, String sql, String query,
                                                           ListQuery listQuery, SysUser user, String tenantCode);

    /**
     * 查询总数
     *
     * @param sql
     * @param query
     * @return
     */
    Integer queryTotal(String sql, String query, String field, SysUser user);

    /**
     * 查询数据分页数量
     *
     * @param field
     * @param sql
     * @param query
     * @param listQuery
     * @param user
     * @param tenantCode
     * @return
     */
    public CompletableFuture<Integer> queryListCount(String field, String sql, String query,
                                                     ListQuery listQuery, SysUser user, String tenantCode);


    /**
     * 角色权限
     *
     * @param
     * @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
     * @author hbWang
     * @date 2023/11/21 15:42
     */
    List<Map<String, Object>> authority(List<Map<String, Object>> dataList, String menuId, SysUser user, String tenantCode);

}
